package com.superatom;

class Game{
    Game(int i){
        System.out.println("Game constructor");
    }
}

class BoardGame extends Game{
    BoardGame(int i){
        // 如果基类只有一个带参数的构造器，但是子类的构造器里没有显示调用父类的构造器会编译报错
        super(i);
        System.out.println("BoardGame constructor");

    }
}
public class Chess extends BoardGame{
    Chess() {
        super(11);
        System.out.println("Chess constructor");
    }

    public static void main(String[] args){
        Chess chess = new Chess();
    }
}
